package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.MemberGrantEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 悦币发放（企业向会员发放悦币，历史遗留问题，2.0之后版本不会出现发放悦币的情况） 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-06-03 15:20:36
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberGrantQuery extends MemberGrantEntity implements Query<MemberGrantEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 企业ID查询条件 */
	@JsonUnwrapped(prefix = "companyId")
	private Condition<String> companyIdCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** 发放悦币额度查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** 充值前悦币余额查询条件 */
	@JsonUnwrapped(prefix = "amountBefore")
	private Condition<BigDecimal> amountBeforeCondition;

    /** 充值后悦币余额查询条件 */
	@JsonUnwrapped(prefix = "amountAfter")
	private Condition<BigDecimal> amountAfterCondition;

    /** 备注查询条件 */
	@JsonUnwrapped(prefix = "remarks")
	private Condition<String> remarksCondition;

    /** 创建人查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberGrantQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberGrantQuery(MemberGrantEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberGrantQuery(MemberGrantQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.companyIdCondition != null) {
			this.companyIdCondition = other.companyIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.amountBeforeCondition != null) {
			this.amountBeforeCondition = other.amountBeforeCondition.copy();
		}
		if(other.amountAfterCondition != null) {
			this.amountAfterCondition = other.amountAfterCondition.copy();
		}
		if(other.remarksCondition != null) {
			this.remarksCondition = other.remarksCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberGrantEntity> toQueryWrapper() {
		QueryWrapper<MemberGrantEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (companyIdCondition != null) {
			companyIdCondition.toWrapper(wrapper, COL_COMPANY_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (amountBeforeCondition != null) {
			amountBeforeCondition.toWrapper(wrapper, COL_AMOUNT_BEFORE);
		}
		if (amountAfterCondition != null) {
			amountAfterCondition.toWrapper(wrapper, COL_AMOUNT_AFTER);
		}
		if (remarksCondition != null) {
			remarksCondition.toWrapper(wrapper, COL_REMARKS);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回企业ID查询条件
	 * 
	 * @return companyIdCondition 企业ID查询条件
	 */
	public Condition<String> companyId() {
		this.companyIdCondition = new Condition<>();
		return this.companyIdCondition;
	}
	
	/**
	 * 获取企业ID查询条件
	 * 
	 * @return companyIdCondition 企业ID查询条件
	 */
	public Condition<String> getCompanyIdCondition() {
		return companyIdCondition;
	}

	/**
	 * 设置企业ID查询条件
	 * 
	 * @param companyIdCondition 企业ID查询条件
	 */
	public void setCompanyIdCondition(Condition<String> companyIdCondition) {
		this.companyIdCondition = companyIdCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return memberWalletIdCondition 查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return memberWalletIdCondition 查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param memberWalletIdCondition 查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回发放悦币额度查询条件
	 * 
	 * @return amountCondition 发放悦币额度查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取发放悦币额度查询条件
	 * 
	 * @return amountCondition 发放悦币额度查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置发放悦币额度查询条件
	 * 
	 * @param amountCondition 发放悦币额度查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回充值前悦币余额查询条件
	 * 
	 * @return amountBeforeCondition 充值前悦币余额查询条件
	 */
	public Condition<BigDecimal> amountBefore() {
		this.amountBeforeCondition = new Condition<>();
		return this.amountBeforeCondition;
	}
	
	/**
	 * 获取充值前悦币余额查询条件
	 * 
	 * @return amountBeforeCondition 充值前悦币余额查询条件
	 */
	public Condition<BigDecimal> getAmountBeforeCondition() {
		return amountBeforeCondition;
	}

	/**
	 * 设置充值前悦币余额查询条件
	 * 
	 * @param amountBeforeCondition 充值前悦币余额查询条件
	 */
	public void setAmountBeforeCondition(Condition<BigDecimal> amountBeforeCondition) {
		this.amountBeforeCondition = amountBeforeCondition;
	}

	/**
	 * 构造并返回充值后悦币余额查询条件
	 * 
	 * @return amountAfterCondition 充值后悦币余额查询条件
	 */
	public Condition<BigDecimal> amountAfter() {
		this.amountAfterCondition = new Condition<>();
		return this.amountAfterCondition;
	}
	
	/**
	 * 获取充值后悦币余额查询条件
	 * 
	 * @return amountAfterCondition 充值后悦币余额查询条件
	 */
	public Condition<BigDecimal> getAmountAfterCondition() {
		return amountAfterCondition;
	}

	/**
	 * 设置充值后悦币余额查询条件
	 * 
	 * @param amountAfterCondition 充值后悦币余额查询条件
	 */
	public void setAmountAfterCondition(Condition<BigDecimal> amountAfterCondition) {
		this.amountAfterCondition = amountAfterCondition;
	}

	/**
	 * 构造并返回备注查询条件
	 * 
	 * @return remarksCondition 备注查询条件
	 */
	public Condition<String> remarks() {
		this.remarksCondition = new Condition<>();
		return this.remarksCondition;
	}
	
	/**
	 * 获取备注查询条件
	 * 
	 * @return remarksCondition 备注查询条件
	 */
	public Condition<String> getRemarksCondition() {
		return remarksCondition;
	}

	/**
	 * 设置备注查询条件
	 * 
	 * @param remarksCondition 备注查询条件
	 */
	public void setRemarksCondition(Condition<String> remarksCondition) {
		this.remarksCondition = remarksCondition;
	}

	/**
	 * 构造并返回创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人查询条件
	 * 
	 * @return createdByCondition 创建人查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人查询条件
	 * 
	 * @param createdByCondition 创建人查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
